#include "apitimer.h"
#include "Timer.h"

apiTimer::apiTimer(QObject *parent)
	: QObject(parent)
{
	qDebug() << "apiTimer::apiTimer";
	_timer = (Timer*)parent;
	_time = 0;
	//start();
}

apiTimer::~apiTimer()
{
	//_timer->deleteLater();
}

void						apiTimer::start()
{
	_time = 0;
	_timer->start();
}

void						apiTimer::stop()
{
	_timer->stop();
}

void						apiTimer::setTime(const unsigned int time)
{
	_time = time;
}

unsigned int				apiTimer::getTime() const
{
	return _time;
}

void						apiTimer::raz()
{
	_time = 0;
	_timer->restart();
}